<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>

<head>
<title>SetStartupInfo</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../styles/styles.css">
<script language="javascript" src='../links.js' type="text/javascript"></script>
</head>
<body>

<h1>SetStartupInfo</h1>
<div class=navbar>
<a href="../index.html">main</a> |
<a href="index.html">exported functions</a>
</div>

<div class=shortdescr>
The <dfn>SetStartupInfo</dfn> function is called once, after the DLL module is loaded to memory.
This function gives the plugin information necessary for further operation.</div>

<pre class=syntax>
void WINAPI SetStartupInfo(
  const struct PluginStartupInfo *Info
);
</pre>
<h3>Parameters</h3>
<div class=descr>

    <div class=dfn>Info</div>
    <div class=dfndescr>Points to a <a href="../structures/pluginstartupinfo.html">PluginStartupInfo</a>
      structure.</div>

</div>

<h3>Return value</h3>
<div class=descr>
  None.
</div>

<h3>Remarks</h3>
<div class=descr>
<ol>
<li>In FAR Manager 1.65 or older this function is called first just after the DLL module is loaded.
<li>In FAR Manager 1.70 or later this function is called after <a href="getminfarversion.html">GetMinFarVersion</a>.
<li>The <dfn>Info</dfn> pointer is valid only until return, so the structure must be copied to an internal variable for further usage:
<pre class=code>static struct PluginStartupInfo Info;
...
void WINAPI _export SetStartupInfo(const struct PluginStartupInfo *Info)
{
  ::Info=*Info;
  ...
}
</pre>
<li>If the plugin uses "standard functions" from the <a href="../fsf/index.html">FarStandardFunctions</a>
    structure then the <a href="../structures/pluginstartupinfo.html">PluginStartupInfo.FSF</a>
    member must be copied to an internal variable for further usage:
  <pre class=code>static struct PluginStartupInfo Info;
static struct FarStandardFunctions FSF;

void  _export SetStartupInfo(struct PluginStartupInfo *psInfo)
{
    Info=*psInfo;
    FSF=*psInfo-&gt;FSF;
    Info.FSF=&amp;FSF; // adjust the address in the local variable
    ...
} </pre>
</ol>
</div>

</body>
</html>
